//
//  CellOfCollectionViewOfService.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/8.
//  Copyright © 2016年 KX. All rights reserved.
//

#import "CellOfCollectionViewOfService.h"
#import "Masonry.h"
@implementation CellOfCollectionViewOfService
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.myimageView = [[UIImageView alloc]init];
        self.label  = [[UILabel alloc]init];
        [self.contentView addSubview:self.myimageView];
        [self.contentView addSubview:self.label];
    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    [self.myimageView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(self.contentView.mas_top).mas_offset(10);
        make.left.equalTo(self.contentView.mas_left).mas_offset(10);
        make.right.equalTo(self.contentView.mas_right).mas_offset(-10);
        make.height.equalTo(self.myimageView.mas_width);
    }];
    [self.label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.left.right.equalTo(self.contentView);
        make.height.mas_offset(10);
        make.top.equalTo(self.myimageView.mas_bottom).mas_offset(10);
    }];
    self.label.textAlignment = NSTextAlignmentCenter;
    self.label.font = [UIFont systemFontOfSize:13];
}


@end
